<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Class: SalesClicExporter::Document::Excel</title>
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '../..';
  if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>

  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="../../_index.html">Index (E)</a> &raquo; 
    <span class='title'><span class='object_link'><a href="../../SalesClicExporter.html" title="SalesClicExporter (module)">SalesClicExporter</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Document.html" title="SalesClicExporter::Document (module)">Document</a></span></span>
     &raquo; 
    <span class="title">Excel</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  <a id="class_list_link" href="#">Class List</a>
  <a id="method_list_link" href="#">Method List</a>
  <a id ="file_list_link" href="#">File List</a>
</div>

      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: SalesClicExporter::Document::Excel
  
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName"><span class='object_link'><a href="Base.html" title="SalesClicExporter::Document::Base (class)">Base</a></span></span>
      
        <ul class="fullTree">
          <li>Object</li>
          
            <li class="next"><span class='object_link'><a href="Base.html" title="SalesClicExporter::Document::Base (class)">Base</a></span></li>
          
            <li class="next">SalesClicExporter::Document::Excel</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/sales_clic_exporter/excel.rb</dd>
  
</dl>
<div class="clear"></div>

<h2>Overview</h2><div class="docstring">
  <div class="discussion">
    <p>
Describes an Excel document
</p>


  </div>
</div>
<div class="tags">
  
</div>
  <h2>Constant Summary</h2>
  
    <dl class="constants">
      
        <dt id="Default_cell_index-constant" class="">Default_cell_index =
          <div class="docstring">
  <div class="discussion">
    <p>
Par défaut on commence à écrire sur la colone 1 au lieu de 0 (sauf pour
les titres)
</p>


  </div>
</div>
<div class="tags">
  
</div>
        </dt>
        <dd><pre class="code"><span class='integer val'>1</span>
</pre></dd>
      
        <dt id="Default_column_width-constant" class="">Default_column_width =
          <div class="docstring">
  <div class="discussion">
    <p>
Taille des colones par défaut, en caractères (sauf la 1ère) Dans la
classe on se sert de @default_column_width qui peut prendre cette valeur ou
celle passée en option lors de l&#8217;instanciation
</p>


  </div>
</div>
<div class="tags">
  
</div>
        </dt>
        <dd><pre class="code"><span class='integer val'>23</span>
</pre></dd>
      
        <dt id="Default_first_column_width-constant" class="">Default_first_column_width =
          <div class="docstring">
  <div class="discussion">
    <p>
Taille de la première colone (qui sert à décaler le texte, pour un effet
de présentation
</p>


  </div>
</div>
<div class="tags">
  
</div>
        </dt>
        <dd><pre class="code"><span class='integer val'>5</span>
</pre></dd>
      
        <dt id="Extension-constant" class="">Extension =
          <div class="docstring">
  <div class="discussion">
    <p>
Extension used to generate an Excel file
</p>


  </div>
</div>
<div class="tags">
  
</div>
        </dt>
        <dd><pre class="code"><span class='string val'>'xls'</span>
</pre></dd>
      
    </dl>
  


  
  
  
  
  <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#token-instance_method" title="#token (instance method)">- (Object) <strong>token</strong> </a>
    

    
  </span>
  
  
    
    
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Ensures that the filename on the server is uniq.
</p>
</div></span>
  
</li>

    
  </ul>


  
    <h2>
      Instance Method Summary
      <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
    </h2>

    <ul class="summary">
      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#filename-instance_method" title="#filename (instance method)">- (Object) <strong>filename</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Nom du document sur le disque.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#finish_initialize-instance_method" title="#finish_initialize (instance method)">- (Object) <strong>finish_initialize</strong>(options = {}) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
This is where the magic happens.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#freezepane-instance_method" title="#freezepane (instance method)">- (Object) <strong>freezepane</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Créé un freezepane horizontal dans le document (fige la partie
supérieure, la partie inférieure est toujours srollable) (fonction
scinder/fixer sous Excel/Openoffice).
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (Excel) <strong>initialize</strong>(client_filename, token = '') </a>
    

    
  </span>
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
A new instance of Excel.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#name-instance_method" title="#name (instance method)">- (Object) <strong>name</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Nom &#8216;formatté&#8217; du document, fournis à l&#8217;utilisateur.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#newline-instance_method" title="#newline (instance method)">- (Object) <strong>newline</strong>(size = nil) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Rajout d&#8217;une ligne vide.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#path-instance_method" title="#path (instance method)">- (Object) <strong>path</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Path du document.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#save-instance_method" title="#save (instance method)">- (Object) <strong>save</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Print du document.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#title_1-instance_method" title="#title_1 (instance method)">- (Object) <strong>title_1</strong>(text) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Titre principal du document.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#title_2-instance_method" title="#title_2 (instance method)">- (Object) <strong>title_2</strong>(text) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Titre secondaire.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#title_3-instance_method" title="#title_3 (instance method)">- (Object) <strong>title_3</strong>(text) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Titre de niveau 3 Par défaut il commence sur la cellule d&#8217;index 1,
au lieu de 0, car il n&#8217;est utilisé que dans le &#8220;corps&#8221;
de la feuille.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#worksheet_name-instance_method" title="#worksheet_name (instance method)">- (Object) <strong>worksheet_name</strong> </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Nom de la 1ère worksheet.
</p>
</div></span>
  
</li>

      
        <li class="public ">
  <span class="summary_signature">
    
      <a href="#worksheet_name%3D-instance_method" title="#worksheet_name= (instance method)">- (Object) <strong>worksheet_name=</strong>(name) </a>
    

    
  </span>
  
  
  
  
  
  

  
    <span class="summary_desc"><div class='inline'><p>
Réglage du nom de la 1ère worksheet.
</p>
</div></span>
  
</li>

      
    </ul>
  


  
  
  
  
  
  
  
  <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Base.html" title="SalesClicExporter::Document::Base (class)">Base</a></span></h3>
  <p class="inherited"><span class='object_link'><a href="Base.html#h_table-instance_method" title="SalesClicExporter::Document::Base#h_table (method)">#h_table</a></span>, <span class='object_link'><a href="Base.html#line-instance_method" title="SalesClicExporter::Document::Base#line (method)">#line</a></span>, <span class='object_link'><a href="Base.html#v_table-instance_method" title="SalesClicExporter::Document::Base#v_table (method)">#v_table</a></span>, <span class='object_link'><a href="Base.html#write-instance_method" title="SalesClicExporter::Document::Base#write (method)">#write</a></span></p>
<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <p class="signature first" id="initialize-instance_method">
  
    - (<tt><span class='object_link'><a href="" title="SalesClicExporter::Document::Excel (class)">Excel</a></span></tt>) <strong>initialize</strong>(client_filename, token = '') 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
A new instance of Excel
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


27
28
29
30
31</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 27</span>

<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='client_filename identifier id'>client_filename</span><span class='comma token'>,</span> <span class='token identifier id'>token</span> <span class='assign token'>=</span> <span class='string val'>''</span><span class='rparen token'>)</span>
  <span class='self self kw'>self</span><span class='dot token'>.</span><span class='token identifier id'>token</span>                <span class='assign token'>=</span> <span class='token identifier id'>token</span>
  <span class='@client_filename ivar id'>@client_filename</span>          <span class='assign token'>=</span> <span class='client_filename identifier id'>client_filename</span>
  <span class='@server_filename ivar id'>@server_filename</span>          <span class='assign token'>=</span> <span class='client_filename identifier id'>client_filename</span> <span class='plus op'>+</span> <span class='token identifier id'>token</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
  
</div>

  <div id="instance_attr_details" class="attr_details">
    <h2>Instance Attribute Details</h2>
    
      
      <span id="token=-instance_method"></span>
      <span id="token-instance_method"></span>
      <div class="method_details first">
  <p class="signature first" id="token-instance_method">
  
    - (<tt>Object</tt>) <strong>token</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Ensures that the filename on the server is uniq
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


9
10
11</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 9</span>

<span class='def def kw'>def</span> <span class='token identifier id'>token</span>
  <span class='@token ivar id'>@token</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>


  <div id="instance_method_details" class="method_details_list">
    <h2>Instance Method Details</h2>
    
    
      <div class="method_details first">
  <p class="signature first" id="filename-instance_method">
  
    - (<tt>Object</tt>) <strong>filename</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Nom du document sur le disque
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


117
118
119</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 117</span>

<span class='def def kw'>def</span> <span class='filename identifier id'>filename</span>
  <span class='dstring node'>&quot;#{@server_filename}.#{Extension}&quot;</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="finish_initialize-instance_method">
  
    - (<tt>Object</tt>) <strong>finish_initialize</strong>(options = {}) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
This is where the magic happens. It&#8217;s called from #compute_export in
export_to_spreadsheet.rb
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 34</span>

<span class='def def kw'>def</span> <span class='finish_initialize identifier id'>finish_initialize</span><span class='lparen token'>(</span><span class='options identifier id'>options</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
  <span class='comment val'># Chargement de la MVJ</span>
  <span class='comment val'># La tableau désigne les arguments passés en ligne de commande à la MVJ</span>
  <span class='filedir identifier id'>filedir</span> <span class='assign token'>=</span> <span class='File constant id'>File</span><span class='dot token'>.</span><span class='dirname identifier id'>dirname</span><span class='lparen token'>(</span><span class='__FILE__ __file__ kw'>__FILE__</span><span class='rparen token'>)</span> <span class='plus op'>+</span> <span class='string val'>'/..'</span>
  <span class='memory identifier id'>memory</span>  <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='string val'>'-Xms256M'</span><span class='comma token'>,</span> <span class='string val'>'-Xmx512M'</span><span class='rbrack token'>]</span> <span class='comment val'># Memory settings</span>
  <span class='Rjb constant id'>Rjb</span><span class='colon2 op'>::</span><span class='load identifier id'>load</span><span class='lparen token'>(</span><span class='dstring node'>&quot;#{filedir}/apache-poi/poi-3.7-20101029.jar&quot;</span><span class='comma token'>,</span> <span class='memory identifier id'>memory</span><span class='rparen token'>)</span>

  <span class='comment val'># Import des packages Java</span>
  <span class='@file_class ivar id'>@file_class</span>               <span class='assign token'>=</span> <span class='Rjb constant id'>Rjb</span><span class='colon2 op'>::</span><span class='import identifier id'>import</span><span class='lparen token'>(</span><span class='string val'>'java.io.FileOutputStream'</span><span class='rparen token'>)</span>
  <span class='@workbook_class ivar id'>@workbook_class</span>           <span class='assign token'>=</span> <span class='Rjb constant id'>Rjb</span><span class='colon2 op'>::</span><span class='import identifier id'>import</span><span class='lparen token'>(</span><span class='string val'>'org.apache.poi.hssf.usermodel.HSSFWorkbook'</span><span class='rparen token'>)</span>
  <span class='@cell_style_class ivar id'>@cell_style_class</span>         <span class='assign token'>=</span> <span class='Rjb constant id'>Rjb</span><span class='colon2 op'>::</span><span class='import identifier id'>import</span><span class='lparen token'>(</span><span class='string val'>'org.apache.poi.hssf.usermodel.HSSFCellStyle'</span><span class='rparen token'>)</span>
  <span class='@cell_range_address_class ivar id'>@cell_range_address_class</span> <span class='assign token'>=</span> <span class='Rjb constant id'>Rjb</span><span class='colon2 op'>::</span><span class='import identifier id'>import</span><span class='lparen token'>(</span><span class='string val'>'org.apache.poi.ss.util.CellRangeAddress'</span><span class='rparen token'>)</span>
  <span class='@region_util_class ivar id'>@region_util_class</span>        <span class='assign token'>=</span> <span class='Rjb constant id'>Rjb</span><span class='colon2 op'>::</span><span class='import identifier id'>import</span><span class='lparen token'>(</span><span class='string val'>'org.apache.poi.hssf.util.HSSFRegionUtil'</span><span class='rparen token'>)</span>
  <span class='@font_class ivar id'>@font_class</span>               <span class='assign token'>=</span> <span class='Rjb constant id'>Rjb</span><span class='colon2 op'>::</span><span class='import identifier id'>import</span><span class='lparen token'>(</span><span class='string val'>'org.apache.poi.hssf.usermodel.HSSFFont'</span><span class='rparen token'>)</span>

  <span class='comment val'># Création fichier et feuilles de calcul</span>
  <span class='@book ivar id'>@book</span> <span class='assign token'>=</span> <span class='@workbook_class ivar id'>@workbook_class</span><span class='dot token'>.</span><span class='new identifier id'>new</span>
  <span class='comment val'># Reglage du nom de la première feuille</span>
  <span class='@sheet ivar id'>@sheet</span> <span class='assign token'>=</span> <span class='@book ivar id'>@book</span><span class='dot token'>.</span><span class='createSheet identifier id'>createSheet</span><span class='lparen token'>(</span><span class='filename identifier id'>filename</span><span class='dot token'>.</span><span class='capitalize identifier id'>capitalize</span><span class='rparen token'>)</span>

  <span class='comment val'># Ligne en cours d'écriture, afin de récupérer le dernier index écrit</span>
  <span class='@current_row_index ivar id'>@current_row_index</span> <span class='assign token'>=</span> <span class='integer val'>0</span>

  <span class='comment val'># Créé plusieurs style de formattage de manière statique.</span>
  <span class='comment val'># Il faut faire attention à ne pas créer les style dans une boucle, leur nombre</span>
  <span class='comment val'># étant limité. C'est pour cela qu'on les créé une fois, et qu'on ne fait ensuite</span>
  <span class='comment val'># que les assigner à des cellules</span>
  <span class='create_styles identifier id'>create_styles</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span>

  <span class='comment val'># Application du formattage par défaut en fonction du Hash d'options</span>
  <span class='comment val'># - réglage taille des colones</span>
  <span class='comment val'># - réduction taille de la première colone</span>
  <span class='default_formatting identifier id'>default_formatting</span><span class='lparen token'>(</span><span class='options identifier id'>options</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="freezepane-instance_method">
  
    - (<tt>Object</tt>) <strong>freezepane</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Créé un freezepane horizontal dans le document (fige la partie
supérieure, la partie inférieure est toujours srollable) (fonction
scinder/fixer sous Excel/Openoffice)
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


111
112
113
114</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 111</span>

<span class='def def kw'>def</span> <span class='freezepane identifier id'>freezepane</span>
  <span class='@sheet ivar id'>@sheet</span><span class='dot token'>.</span><span class='createFreezePane identifier id'>createFreezePane</span><span class='lparen token'>(</span><span class='integer val'>0</span><span class='comma token'>,</span> <span class='@current_row_index ivar id'>@current_row_index</span><span class='rparen token'>)</span>
  <span class='self self kw'>self</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="name-instance_method">
  
    - (<tt>Object</tt>) <strong>name</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Nom &#8216;formatté&#8217; du document, fournis à l&#8217;utilisateur
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


122
123
124</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 122</span>

<span class='def def kw'>def</span> <span class='name identifier id'>name</span>
  <span class='dstring node'>&quot;#{@client_filename}.#{Extension}&quot;</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="newline-instance_method">
  
    - (<tt>Object</tt>) <strong>newline</strong>(size = nil) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Rajout d&#8217;une ligne vide
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


97
98
99
100
101
102
103
104
105
106</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 97</span>

<span class='def def kw'>def</span> <span class='newline identifier id'>newline</span><span class='lparen token'>(</span><span class='size identifier id'>size</span> <span class='assign token'>=</span> <span class='nil nil kw'>nil</span><span class='rparen token'>)</span>
  <span class='if if kw'>if</span> <span class='size identifier id'>size</span>
    <span class='row identifier id'>row</span> <span class='assign token'>=</span> <span class='@sheet ivar id'>@sheet</span><span class='dot token'>.</span><span class='createRow identifier id'>createRow</span><span class='lparen token'>(</span><span class='@current_row_index ivar id'>@current_row_index</span><span class='rparen token'>)</span>
    <span class='row identifier id'>row</span><span class='dot token'>.</span><span class='setHeight identifier id'>setHeight</span><span class='lparen token'>(</span><span class='size identifier id'>size</span> <span class='mult op'>*</span> <span class='integer val'>20</span><span class='rparen token'>)</span> <span class='comment val'># Configuration de la hauteur en 1/20 de caractère</span>
  <span class='end end kw'>end</span>

  <span class='increment_row_index identifier id'>increment_row_index</span>

  <span class='self self kw'>self</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="path-instance_method">
  
    - (<tt>Object</tt>) <strong>path</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Path du document
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


127
128
129
130</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 127</span>

<span class='def def kw'>def</span> <span class='path identifier id'>path</span>
  <span class='root_path identifier id'>root_path</span> <span class='assign token'>=</span> <span class='defined? defined kw'>defined?</span><span class='lparen token'>(</span><span class='Rails constant id'>Rails</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='dstring node'>&quot;#{Rails.root}/&quot;</span> <span class='colon op'>:</span> <span class='string val'>&quot;/&quot;</span>
  <span class='dstring node'>&quot;#{root_path}tmp/#{filename}&quot;</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="save-instance_method">
  
    - (<tt>Object</tt>) <strong>save</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Print du document
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


133
134
135
136
137
138</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 133</span>

<span class='def def kw'>def</span> <span class='save identifier id'>save</span>
  <span class='comment val'># Ecriture des données dans un fichier du répertoire /tmp de Rails</span>
  <span class='out identifier id'>out</span> <span class='assign token'>=</span> <span class='@file_class ivar id'>@file_class</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='self self kw'>self</span><span class='dot token'>.</span><span class='path identifier id'>path</span><span class='rparen token'>)</span>
  <span class='@book ivar id'>@book</span><span class='dot token'>.</span><span class='write identifier id'>write</span><span class='lparen token'>(</span><span class='out identifier id'>out</span><span class='rparen token'>)</span>
  <span class='out identifier id'>out</span><span class='dot token'>.</span><span class='close identifier id'>close</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="title_1-instance_method">
  
    - (<tt>Object</tt>) <strong>title_1</strong>(text) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Titre principal du document
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


80
81
82</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 80</span>

<span class='def def kw'>def</span> <span class='title_1 identifier id'>title_1</span><span class='lparen token'>(</span><span class='text identifier id'>text</span><span class='rparen token'>)</span>
  <span class='title identifier id'>title</span><span class='lparen token'>(</span><span class='text identifier id'>text</span><span class='comma token'>,</span> <span class='integer val'>1</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="title_2-instance_method">
  
    - (<tt>Object</tt>) <strong>title_2</strong>(text) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Titre secondaire
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


85
86
87</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 85</span>

<span class='def def kw'>def</span> <span class='title_2 identifier id'>title_2</span><span class='lparen token'>(</span><span class='text identifier id'>text</span><span class='rparen token'>)</span>
  <span class='title identifier id'>title</span><span class='lparen token'>(</span><span class='text identifier id'>text</span><span class='comma token'>,</span> <span class='integer val'>2</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="title_3-instance_method">
  
    - (<tt>Object</tt>) <strong>title_3</strong>(text) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Titre de niveau 3 Par défaut il commence sur la cellule d&#8217;index 1,
au lieu de 0, car il n&#8217;est utilisé que dans le &#8220;corps&#8221;
de la feuille
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


92
93
94</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 92</span>

<span class='def def kw'>def</span> <span class='title_3 identifier id'>title_3</span><span class='lparen token'>(</span><span class='text identifier id'>text</span><span class='rparen token'>)</span>
  <span class='title identifier id'>title</span><span class='lparen token'>(</span><span class='text identifier id'>text</span><span class='comma token'>,</span> <span class='integer val'>3</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="worksheet_name-instance_method">
  
    - (<tt>Object</tt>) <strong>worksheet_name</strong> 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Nom de la 1ère worksheet
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


75
76
77</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 75</span>

<span class='def def kw'>def</span> <span class='worksheet_name identifier id'>worksheet_name</span>
  <span class='@book ivar id'>@book</span><span class='dot token'>.</span><span class='getSheetName identifier id'>getSheetName</span><span class='lparen token'>(</span><span class='integer val'>0</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
      <div class="method_details ">
  <p class="signature " id="worksheet_name=-instance_method">
  
    - (<tt>Object</tt>) <strong>worksheet_name=</strong>(name) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
Réglage du nom de la 1ère worksheet
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


70
71
72</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/sales_clic_exporter/excel.rb', line 70</span>

<span class='def def kw'>def</span> <span class='worksheet_name= identifier id'>worksheet_name=</span><span class='lparen token'>(</span><span class='name identifier id'>name</span><span class='rparen token'>)</span>
  <span class='@book ivar id'>@book</span><span class='dot token'>.</span><span class='setSheetName identifier id'>setSheetName</span><span class='lparen token'>(</span><span class='integer val'>0</span><span class='comma token'>,</span> <span class='name identifier id'>name</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
    
  </div>

</div>
    
    <div id="footer">
  Generated on 05/16/11 10:59:53 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
  0.6.7 (ruby-1.8.7).
</div>

  </body>
</html>